-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make QRcode decoding non-blocking by doing it in a thread #39
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Cheaterman for giving it a try.
It looks OK on the diff even though I haven't tried.
Note the unit tests are failing, could you try to update your PR fixing them.
The error is:
> symbols = self.zbarcam._detect_qrcode_frame(texture, code_types)
E TypeError: _detect_qrcode_frame() missing 1 required positional argument: 'code_types'
refs https://travis-ci.com/github/kivy-garden/zbarcam/jobs/371384314
Thanks for taking a look @AndreMiras - lemme fix that (I changed the signature of |
It takes pixels independently of texture because in normal usage the decoding will be done in a separate thread (which therefore can't make the required GL calls to access the pixels).
I think that will do :-) |
Welp - this should be better. I had things set up in a way that wouldn't work if |
Haha, I'm silly, the tests need to run differently because of the now asynchronous nature of |
It's "more or less" left as-is, since I need to pass the pixels separately (can't write to |
I noticed my entire application was frozen the first time I used zbarcam, this seems to fix it. 👍